Optional
Methods in Control Interfaces
Implementing
an interface doesn t necessarily mean implementing all methods of that
interface to do anything more than return E_NOTIMPL or S_OK as appropriate. The
following table identifies the methods of the interfaces listed in the What
Support for an Interface Means
Method |
Comments |
IOleControl |
|
GetControlInfo,
OnMnemonic |
Mandatory
for controls with mnemonics. |
OnAmbientPropertyChange |
Mandatory
for controls that use ambient properties. |
FreezeEvents |
See Event
Freezing |
|
|
IOleObject |
|
SetMoniker |
Mandatory
if the control is not marked with OLEMISC_CANTLINKINSIDE |
GetMoniker |
Mandatory
if the control is not marked with OLEMISC_CANTLINKINSIDE |
InitFromData |
Optional |
GetClipboardData |
Optional |
SetExtent |
Mandatory
only for DVASPECT_CONTENT |
GetExtent |
Mandatory
only for DVASPECT_CONTENT |
SetColorScheme |
Optional |
DoVerb |
See Note 1. |
|
|
IOleInPlaceObject |
|
ContextSensitiveHelp |
Optional |
ReactivateAndUndo |
Optional |
|
|
IOleInPlaceActiveObject |
|
ContextSensitiveHelp |
Optional |
|
|
IViewObject2 |
|
Freeze |
Optional |
Unfreeze |
Optional |
GetColorSet |
Optional |
|
|
IPersistStream[Init], |
|
GetSizeMax |
See Note 2. |
1. A control with property pages must support IOleObject::DoVerbs
for the OLEIVERB_PROPERTIES and OLEIVERB_PRIMARY verbs. A control that can be
active must support IOleObject::DoVerbs for the
OLEIVERB_INPLACEACTIVATE verb. A control
that can be UI active must also support IOleObject::DoVerbs for
the OLEIVERB_UIACTIVATE verb. |
|
2. If a control supports IPersistStream[Init]
and can return an accurate value, then it should do so. |